package ha.web.database;
import java.util.Random;

public class UserId {
	 
	private String name;
	private String pass;
	private int userId;
	
	/**
	 * 
	 * @return
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * 
	 * @return
	 */
	public String getPass() {
		return pass;
	}
	
	public UserId (String name, String pass) {
		ValidateUser(name,pass);
		this.name = name;
		this.pass = pass;
		Random r = new Random();
		this.userId =  r.nextInt();
				//Integer.valueOf(this.name)*Integer.valueOf(this.pass)*r.nextInt();
	}

	private void ValidateUser(String name, String pass) {
		//return DBConnector.IsUserAtDB(user);		
	}

	public boolean IsUserAtDB(UserId user) {
		return DBConnector.IsUserAtDB(user);
	}

	public int getUserID() {
		return userId;
	}
	
	
}
